package com.edu.d3_polymorphic_test;

/**
 * 鼠标实现类，实现USB接口，也可以有自己独有的功能
 */
public class Mouse implements USB{
    private String name;

    public Mouse() {
    }

    public Mouse(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public void connect() {
        System.out.println(name+"已接入USB");
    }

    @Override
    public void unconnect() {
        System.out.println(name+"已断开USB");
    }
    /**
     * 独有的功能
     */
    public void dbClick(){
        System.out.println(name+"敲击666");
    }
}
